import java.io.IOException;

public class Runner {
    public static void main(String[] args) throws IOException {
        if (jigsawNode.getDimension() != 5) {
            System.out.print("节点维数不正确，请将JigsawNode类的维数dimension改为5");
            return;
        }

        // 生成目标状态对象destNode: {25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,0};
        jigsawNode destNode = new jigsawNode(new int[]{25, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0});

        // 生成随机初始状态对象startNode：将目标状态打散，生成可解的随机初始状态
        jigsawNode startNode = Jigsaw.scatter(destNode, 1000);
        Jigsaw jigsaw = new Jigsaw(startNode, destNode);
        jigsaw.ASearch();
    }
}